// 引入map


import * as fs from 'fs-extra'
import * as path from 'path'


const fpath = path.resolve(__dirname, 'test.map')

// 读取test.map文件中的内容
const mapJson = fs.readFileSync(fpath, 'utf-8')

// 将JSON字符串转为Map对象
const mapArray = JSON.parse(mapJson)
const importedMap = new Map<string, number>(mapArray)

// 输出Map对象的内容
importedMap.forEach((value, key) => {
    console.log(`${key}: ${value}`)
})